package com.capgemini.cn.authority.data.entity;

import com.capgemini.cn.authority.data.core.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * <p>用户表，用以保存系统用户的基本信息</p>
 * Created by 2017/9/10
 *
 * @author yaxia
 */
@Entity
@Table(name = "cg_users")
public class Users extends BaseEntity {

    /**
     * 用户名，必须保持唯一
     */
    @Column(name = "username", length = 50, nullable = false, unique = false)
    @Getter
    @Setter
    private String userName;

    /**
     * 密码
     */
    @Column(name = "password", length = 50, nullable = false)
    @Getter
    @Setter
    private String password;

    /**
     * 用户状态，true表示启用用户，false则表示禁用用户
     */
    @Column(name = "enabled", nullable = false)
    @Getter
    @Setter
    private boolean enabled;
}
